-----------------------------------
-- Area: Southern San d'Oria
-- NPC: Lusiane
-- Standard Merchant NPC
-----------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/shop");
require("scripts/globals/quests");
require("scripts/zones/Southern_San_dOria/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
-- "Flyers for Regine" conditional script
FlyerForRegine = player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE);

	if (FlyerForRegine == 1) then
		count = trade:getItemCount();
		MagicFlyer = trade:hasItemQty(532,1);
		if (MagicFlyer == true and count == 1) then
			player:messageSpecial(FLYER_REFUSED);
		end
	end
end; 

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
	
	player:showText(npc,LUSIANE_SHOP_DIALOG);

	stock = {0x43ed,496,1,		-- Bamboo Fishing Rod

			 0x43f3,9,2,		-- Lugworm
			 0x43ee,217,2,		-- Yew Fishing Rod

			 0x43f4,3,3,		-- Little Worm
			 0x13cc,110,3,		-- Scroll of Light Threnoldy
			 0x13ca,1265,3,		-- Scroll of Lightning Threnoldy
			 0x43ef,66,3}		-- Willow Fishing Rod
	 
	showNationShop(player, SANDORIA, stock);

end; 

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;




